package com.hongdee.insurance.order.dao;

import com.hongdee.base.basedao.IBaseDao;
import com.hongdee.insurance.order.entity.TInsuranceOrder;
import com.hongdee.insurance.order.entity.TInsuranceOrderItem;

/**
 * Created by Mr. Xu on 2017/4/27.
 */
public interface ITInsuranceOrderDao extends IBaseDao {


    /**
     * 根据报价单ID 车辆ID获取保险单信息
     * @param qid
     * @param carId
     * @return
     * @throws Exception
     */
    public TInsuranceOrder info(String qid,String carId) throws Exception;

    /**
     * 根据主键获取保险单信息
     * @param id
     * @return
     * @throws Exception
     */
    public TInsuranceOrder info(String id)throws Exception;

    /**
     * 获得交强或商业险信息
     * @param orderId
     * @param type
     * @param contractNO
     * @return
     */
    public TInsuranceOrderItem getOrderItemInfo(String orderId,String type,String contractNO) throws Exception;

    /**
     * 根据类型查询保险对应的商业险 交强险信息
     * @param orderId
     * @param type
     * @return
     * @throws Exception
     */
    public TInsuranceOrderItem getOrderItemInfo(String orderId, String type) throws Exception;

    /**
     * 修改合同号 查询是否有合同号重复
     * @param contractNo
     * @param itemId
     * @return false 允许继续添加 说明有重复合同号， true允许继续添加
     * @throws Exception
     */
    public boolean checkOrderItemInfoByContractNo(String contractNo,String itemId) throws Exception;

    public void delOrderItem(String orderId,String type) throws Exception;

}
